<style>
.form-control { 
display: block; 
width: 100%; 
height: 34px; 
padding: 6px 12px; 
font-size: 14px; 
line-height: 1.428571429; 
color: #555555; 
vertical-align: middle; 
background-color: #ffffff; 
border: 1px solid #cccccc; 
border-radius: 4px; 
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); 
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); 
-webkit-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; 
transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; 
} 
.form-control:focus { 
border-color: #66afe9; 
outline: 0; 
-webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6); 
box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6); 
}
input,button
{
    font-family:"Arial","Tahoma","微软雅黑","雅黑";
    border:0px;
    vertical-align:middle;
    margin:8px;
    line-height:18px;   
    font-size:16px;
}
</style>
<div class="head">
    <div class="head_box">
        <h1 class="logo">{$pro_name} 接口文档</h1>
        <div class="header_ctrls">

            <ul class="top_nav">
                <if condition="($admin_user.edit_permission eq 1) or ($admin_user.type eq 0)">
                    <li class="top_nav_item ">
                        <a class="top_nav_item_title" href="{:U('User/index')}"><i class="fa fa-user"></i> 用户管理</a>
                    </li>
                </if>
                <li class="top_nav_item ">
                    <a class="top_nav_item_title" id="changePwd" ><i class="fa fa-cog fa-fw"></i> 修改密码</a>
                </li>
                <li class="top_nav_item ">
                    <a class="top_nav_item_title" href="{:U('Login/logout')}"><i class="fa fa-arrow-circle-o-right"></i> 退出登录</a>
                </li>
            </ul>
        </div>
    </div>
</div>
<div class="md-modal md-effect-4" id="modal-4">
    <div class="md-content">
        <h3>修改密码</h3>
        <div>
            <div class="modal-body">
                <div class="mline"><label>旧密码：</label><input type="password" id="oldpwd" class="form-control" placeholder="输入旧密码"/></div>
                <div class="mline"><label>新密码：</label><input type="password" id="newpwd" class="form-control" placeholder="输入新密码" /></div>
                <div class="mline"><label>新密码：</label><input type="password" id="newpwd1" class="form-control" placeholder="再次输入新密码"/></div>
            </div>
            <div class="">
                <button type="button" class="md-close" data-dismiss="modal" style="float:right;">关闭</button>
                <button type="button" class="" id="savebtn" data-id="" style="margin-left:100px;float:right">保存</button>
            </div>
        </div>
    </div>
</div>
<div class="md-overlay"></div><!-- the overlay element -->
<script>
    $(document).ready(function () {
        
        $('#changePwd').click(function () {
            $('#modal-4').addClass("md-show");
        });
        $('.md-overlay').click(function () {
            $('#modal-4').removeClass("md-show");
        });
        $('.md-close').click(function () {
            $('#modal-4').removeClass("md-show");
        });
        $('#savebtn').click(function () {
            // $('#waiting').show();
            var data={
                oldpwd:$('#oldpwd').val(),
                newpwd:$('#newpwd').val(),
                newpwd1:$('#newpwd1').val()
            };
            $.post('{:U("User/modifyPwd")}',data,function (res) {
                $('#waiting').hide();
                if(res.status==200){
                    window.location.reload();
                }else{
                    alert(res.message);
                }
            },'json');
        });
    });
</script>





